package com.bwie.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @className: UserControlle
 * @Description: TODO
 * @version: v1.８.0
 * @author: 刘茂锴
 * @date: 2025/10/13 10:25
 */
@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserController {
    @Autowired
    private UserService userService;

    //根据手机号查询用户信息
    @GetMapping("/selectPhoneByUser/{phone}")
    public Result<User> selectPhoneByUser(@PathVariable("phone")String phone){
        User user=userService.selectPhoneByUser(phone);
        return Result.success(user);
    }
}
